<template>
  <!-- 签署情况 -->
  <div class="table">
    <!-- 操作按钮 start -->
    <div class="table-operator">
      <a-button type="primary" icon="plus" @click="handleAdd()">新增</a-button>
    </div>
    <!-- 操作按钮 end -->
    <!-- 签署列表展示 start -->
    <s-table
      ref="table"
      size="default"
      :row-key="record => record.id"
      :data="dataTable"
    >
      <a-table-column title="序号" key="id" data-index="id" />
      <a-table-column title="合同名称" key="name" data-index="name" />
      <a-table-column title="发起时间" key="createTime" data-index="createTime">
        <template slot-scope="text, record">
          {{ record.createTime | moment() }}
        </template>
      </a-table-column>
      <a-table-column title="签署人" key="account" data-index="account" />
      <a-table-column title="签署状态" key="status" data-index="status">
        <template slot-scope="text, record">
          <span>
            <a-tag>{{ record.status }}</a-tag>
          </span>
        </template>
      </a-table-column>
      <a-table-column title="签署时间" key="modifyTime" data-index="modifyTime">
        <template slot-scope="text, record">
          {{ record.modifyTime | moment() }}
        </template>
      </a-table-column>
      <a-table-column title="操作">
        <template slot-scope="record">
          <!-- <router-link :to="{ name: 'productionOrderExamineDetail', query: record }">
            查看
          </router-link> -->
          <span>
            <a @click="clickViewContract(record)">查看</a>
          </span>
        </template>
      </a-table-column>
    </s-table>
    <!-- 签署列表展示 end -->
  </div>
</template>

<script>
import { fetchUserList } from '@/api/account/user'
export default {
  data () {
    return {
      queryParam: {},
      dataTable: parameter => {
        return fetchUserList(Object.assign(parameter, this.queryParam))
          .then(res => {
            console.log(res, '获取的合同模板列表信息')
            return res
          })
          .catch(() => {})
      }
    }
  },
  created () {
  },
  methods: {
  }
}
</script>

<style scoped></style>
